<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-model指令</title>
    <script src="vue.js"></script>
    <style>
    </style>
</head>

<body>
    <div id="app">

        信息：<input type="text" placeholder="请输入信息" v-model="msg"> <br>
        <div>
            {{msg}}
        </div><br>
        姓名：<input type="text" placeholder="请输入姓名" v-model="userform.name"><br>
        年龄：<input type="text" placeholder="请输入年龄" v-model="userform.age"><br>
        <div>
            {{userform.name}}<br>
            {{userform.age}}
        </div>
    </div>


</body>

</html>
<script>
    var vm = new Vue({
        el: "#app",
        data: {
            msg: '',
            userform: {
                name: "张三",
                age: 23
            }
        }
    })
</script>